using System;
using System.ComponentModel;
using System.Runtime.Serialization;

namespace WcfService1.DTO
{
    [DataContract]
    public class EmployeeDTO : INotifyPropertyChanged
    {
        private String _Address;
        private String _KodeSalesman;
        private String _MobilePhone;
        private String _NamaDepan;
        private String _NamaLengkap;
        private int _No;
        private String _Telp;

        [DataMember]
        public String KodeSalesman
        {
            get { return _KodeSalesman; }
            set
            {
                _KodeSalesman = value;
                RaisePropertyChanged("KodeSalesman");
            }
        }

        [DataMember]
        public String NamaDepan
        {
            get { return _NamaDepan; }
            set
            {
                _NamaDepan = value;
                RaisePropertyChanged("NamaDepan");
            }
        }

        [DataMember]
        public String NamaLengkap
        {
            get { return _NamaLengkap; }
            set
            {
                _NamaLengkap = value;
                RaisePropertyChanged("NamaLengkap");
            }
        }


        [DataMember]
        public String Address
        {
            get { return _Address; }
            set
            {
                _Address = value;
                RaisePropertyChanged("Address");
            }
        }


        [DataMember]
        public String Telp
        {
            get { return _Telp; }
            set
            {
                _Telp = value;
                RaisePropertyChanged("Telp");
            }
        }


        [DataMember]
        public String MobilePhone
        {
            get { return _MobilePhone; }
            set
            {
                _MobilePhone = value;
                RaisePropertyChanged("MobilePhone");
            }
        }

        public int No
        {
            get { return _No; }
            set
            {
                _No = value;
                RaisePropertyChanged("No");
            }
        }

        #region INotifyPropertyChanged Members

        public event PropertyChangedEventHandler PropertyChanged;

        #endregion

        protected void RaisePropertyChanged(string propertyname)
        {
            PropertyChangedEventHandler handler = PropertyChanged;
            if (handler != null)
                handler(this, new PropertyChangedEventArgs(propertyname));
        }
    }
}